package CircuitLogic;
import static java.lang.Math.*;
/*
	电路元件中的标准电池
 */
public class StandardBattery extends Components
{
	private final double electromotiveForce;

	/*
		输入温度，单位为摄氏度
		内阻自动生成，范围为700~730Ω
	 */
	StandardBattery(double temperature)
	{
		final double E_20 = 1.01860;
		electromotiveForce = E_20-3.99*1e-5*(temperature-20)-0.94*1e-6*pow(temperature-20,2)-9*1e-9*pow(temperature-20,3);
		setResistance(700+random()*30);
	}

	double getElectronicForce()
	{
		return electromotiveForce;
	}

}